// 长连接测试
#include "httpserver.hpp"

int main()
{
    Socket client_sock;
    client_sock.CreateClient(8202, "127.0.0.1");
    std::string req = "GET /hello HTTP/1.1\r\nConnection: keep-alive\r\nContent-Length: 0\r\n\r\n";
    while(1)
    {
        assert(client_sock.Send(&req[0], req.size()) != -1);
        char buf[1024] = {0};
        assert(client_sock.Recv(buf, 1023));
        DEBUG_LOG("[%s]", buf);
        sleep(2);
    }
    client_sock.Close();
    return 0;
}